﻿using System.Collections.Generic;

namespace Chess.Domain
{
	public abstract class Piece
	{
		#region " Properties "

		private string _ID;

		/// <summary>
		/// 
		/// </summary>
		public string ID
		{
			get { return _ID; }
		}

		private string _Name;

		/// <summary>
		/// 
		/// </summary>
		public string Name
		{
			get { return _Name; }
		}

		private Type _Type;

		/// <summary>
		/// 
		/// </summary>
		public Type Type
		{
			get { return _Type; }
			internal set { _Type = value; }
		}

		private Color _Color;

		/// <summary>
		/// 
		/// </summary>
		public virtual Color Color
		{
			get { return _Color; }
			internal set { _Color = value; }
		}

		private Position _CurrentPosition;

		/// <summary>
		/// 
		/// </summary>
		public Position CurrentPosition
		{
			get { return _CurrentPosition; }
			set { _CurrentPosition = value; }
		}

		private IPositionDeterminant _Determine;

		/// <summary>
		/// 
		/// </summary>
		internal IPositionDeterminant Determine
		{
			get { return _Determine; }
			set { _Determine = value; }
		}

		#endregion


        /// <summary>
        /// Get the available positions that a piece could occupy based on it current one.
        /// </summary>
        public List<Position> GetAvailablePositions()
		{
			return Determine.AvailablePositions(CurrentPosition);
		}


		#region " Helper Methods "



		#endregion
	}
}
